package com.huitone.gddw.service.dto;

import com.huitone.gddw.common.excel.ColToProperty;
import com.huitone.gddw.common.excel.TabCol;
import com.huitone.gddw.dao.entity.SvrRouteRule;

/**
 * 短信业务路由规则 DTO 对象
 * @author wuluodan
 *
 */
public class SvrRouteRuleDTO {

	@ColToProperty
	@TabCol(Index = 1, title = "序号", width = "")
	private Integer seq;
	
	private String ruleId;
	
	@ColToProperty
	@TabCol(Index = 2, title = "路由名称", width = "90")
	private String ruleName;
	
	private String svrNode;
	
//	@ColToProperty
//	@TabCol(Index = 3, title = "业务端名称", width = "90")
	private String svrNodeName;
	
	private String serviceCode;
	
	@ColToProperty
	@TabCol(Index = 3, title = "短信类型名称", width = "90")
	private String serviceName;
	
	private String gateLinkId;
	
	@ColToProperty
	@TabCol(Index = 4, title = "短信通道名称", width = "90")
    private String gateLinkName;
	
	private String status;
	
	@ColToProperty
	@TabCol(Index = 5, title = "状态", width = "")
	private String statusStr;
	
	@ColToProperty
	@TabCol(Index = 6, title = "说明", width = "150")
	private String desc;
	
	 private String routeLevel;	// 优先级
	
	public SvrRouteRuleDTO() {}
	
	public SvrRouteRuleDTO(SvrRouteRule entity) {
		this.setRuleId(entity.getRuleId());
		this.setRuleName(entity.getRuleName());
//		this.setSvrNode(entity.getSvrNode());
		this.setServiceCode(entity.getServiceCode());
		this.setGateLinkId(entity.getGateLinkId());
		this.setStatus(entity.getStatus());
		this.setDesc(entity.getDesc());
	}

	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public String getRuleId() {
		return ruleId;
	}

	public void setRuleId(String ruleId) {
		this.ruleId = ruleId;
	}

	public String getRuleName() {
		return ruleName;
	}

	public void setRuleName(String ruleName) {
		this.ruleName = ruleName;
	}

	public String getSvrNode() {
		return svrNode;
	}

	public void setSvrNode(String svrNode) {
		this.svrNode = svrNode;
	}

	public String getGateLinkId() {
		return gateLinkId;
	}

	public void setGateLinkId(String gateLinkId) {
		this.gateLinkId = gateLinkId;
	}

	public String getSvrNodeName() {
		return svrNodeName;
	}

	public void setSvrNodeName(String svrNodeName) {
		this.svrNodeName = svrNodeName;
	}

	public String getServiceCode() {
		return serviceCode;
	}

	public void setServiceCode(String serviceCode) {
		this.serviceCode = serviceCode;
	}

	public String getServiceName() {
		return serviceName;
	}

	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	public String getGateLinkName() {
		return gateLinkName;
	}

	public void setGateLinkName(String gateLinkName) {
		this.gateLinkName = gateLinkName;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getStatusStr() {
		if (null == this.status) {
			return "未知";
		}
		if (this.status.equals("1")) {
			return "有效";
		}
		if (this.status.equals("0")) {
			return "失效";
		}
		return "未知";
	}

	public void setStatusStr(String statusStr) {
		this.statusStr = statusStr;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getRouteLevel() {
		return routeLevel;
	}

	public void setRouteLevel(String routeLevel) {
		this.routeLevel = routeLevel;
	}
	
}
